home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / net / drexxmail.lha / sendmail.rexx < prev   
OS/2 REXX Batch file  |  1994-09-30  |  1KB  |  57 lines

  1. /* sendmail.rexx ... script to fudge "sendmail" for DNET,          */
  2. /* Version 1.03, by Rick Taylor, 7-20-94                           */
  3. /* Version 3.00 - Just uses different names for                    */
  4. /*                GRn/AmigaElm/Send_Mail                           */
  5.  
  6.  
  7. /* Thanks to Joe Rumsey for suggesting using 'putfiles'            */
  8.  
  9. MailFile = ARG(1)
  10. options results
  11. lf = '0a'x
  12. cr = '0d'x
  13. address command
  14.  
  15. /* If the proper dshrexx isn't running, start it.  Else go on */
  16. /* We want to make sure there's some way to get commands to   */
  17. /* the UNIX side                                              */
  18.  
  19. portok = show('p','DNETMAIL.01')
  20. if portok = 0 then 'run <nil: >nil: dnet:dshrexx 8195 0 DNETMAIL' 
  21. waitforport DNETMAIL.01
  22. waitforport DNETMAIL.01
  23.  
  24. /* Copy the mail file */
  25.  
  26. 'copy' Mailfile "t:rsm.mail QUIET"
  27.  
  28. /* Put the file in your unix directory */
  29.  
  30. 'dnet:putfiles <NIL: >NIL: t:rsm.mail'
  31.  
  32. /* Tell UNIX to send it now ... then delete the temp file on UNIX */
  33.  
  34. address 'DNETMAIL.01'
  35. rxinit
  36. "raw"
  37. "send stty -echo" lf
  38. getln
  39.  
  40. /* NOTE: Check this path to see if it's correct for your UNIX host */
  41.  
  42. "send /usr/lib/sendmail -t < rsm.mail"lf
  43. getln
  44. "send rm rsm.mail"lf
  45. getln
  46.  
  47. /* Log this dshrexx out - we don't need it hanging around wasting space */
  48.  
  49. "send logout"lf
  50.  
  51. /* Good night, Gracie */
  52.  
  53. address command
  54. 'delete t:rsm.mail QUIET'
  55. exit
  56.  
  57.